using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using ERP.BusinessEntities.Base;
using ERP.DAL.Factory;
namespace ERP.BusinessEntities
{

	public class BSCompanysController:BaseBusinessController
	{
		public BSCompanysController()
		{
			dal = FactoryDal.CreateEndDal("BSCompanys");
		}

        public BaseBusinessInfo GetFirstObject()
        {
            String strQuery = String.Format("SELECT * FROM BSCompanys WHERE AAStatus = 'Alive'");
            DataSet ds = GetDataset(strQuery);

            if (ds != null && ds.Tables.Count > 0
                && ds.Tables[0].Rows.Count > 0)
                return (BaseBusinessInfo)GetObjectFromDataRow(ds.Tables[0].Rows[0]);
            return null;
        }
	}
}
